/**
 * @DirMovieData.as
 *
 * @author sodaChen mail:asframe@qq.com
 * @version 1.0
 * <br>Copyright (C), 2016 asFrame.com
 * <br>This program is protected by copyright laws.
 * <br>Program Name:ASFrame
 * <br>Date:2016-7-6
 */
package com.asframe.display.data
{
	import com.asframe.collections.maps.HashMap;

	/**
	 * 具备方向的动画数据结构
	 * @author sodaChen
	 * Date:2016-7-6
	 */
	public class DirMovieData
	{
		/** 动画对象的相关配置属性和参数 **/
		public var config:*;
		/** 动画数据文件 **/
		public var labelMap:HashMap;

		public function DirMovieData()
		{
			labelMap = new HashMap();
		}
		/**
		 * 获取当前动作名称
		 * @param actName
		 * @return
		 *
		 */
		public function getDirFrames(actName:String):Vector.<MovieData>
		{
			return labelMap.get(actName);
		}
		/**
		 * 获取当前动作指定方向的动画数据
		 */
		public function getMovie(actName:String,dir:int):MovieData
		{
			return getDirFrames(actName)[dir];
		}
		/**
		 * 存放指动作定方向的动画数据
		 * @param actName 动作名称
		 * @param dir 方向值
		 * @param movieData 动画数据
		 *
		 */
		public function putMoive(actName:String,dir:int,movieData:MovieData):void
		{
			getDirFrames(actName)[dir] = movieData;
		}
	}
}